//-------------------------------------------------------------------
//	Copyright (c) 2010-2012 Zhirnov Andrey
//	This file is part of the "UXGEN" project.
//	See copyright notice in "Engine.h".
//-------------------------------------------------------------------

#ifndef _UX_VIEWPORT_H
#define _UX_VIEWPORT_H

#include <Includes.h>

namespace Engine
{
namespace RenderUtils
{

	//
	// Viewport
	//

	class _EXPORT_ CViewport : public CEngBaseObject
	{
	protected:
		irect		_sRect;

	public:
		CViewport(): _sRect() {}
		CViewport(const irect &rect): _sRect(rect) {}
		~CViewport() {}

		const irect &	Rect()		const	{ return _sRect; }
		const uvec2 	Size()		const	{ return _sRect.GetSize().To<uvec2>(); }


		virtual bool Bind() = 0;			// set viewport states (matrices, ...)
		virtual bool Unbind() = 0;			// reset states
		virtual void OnResize() = 0;
	};

//-------------------------------------------------------------------

}	// RenderUtils
}	// Engine

#endif	// _UX_VIEWPORT_H